FILE_NAME = r'G:\django-codes\AutoCreateCase\channel_add.yaml'
with open(FILE_NAME, encoding='utf-8') as file:
    print(file.read())

file = open(FILE_NAME, encoding='utf-8').__enter__()
try:
    print(file.read())
finally:
    file.__exit__()